﻿using System.Globalization;
using Medianamik.Core;
using Medianamik.UI.ContentManagement;

namespace Medianamik.Tests.Integration.Medianamik.UI.Web
{
    public class NodeManagementFake : NodeManagement
    {
        internal override NodeWrapper GetUpdatedNode()
        {
            return CurrentNode;
        }

        public override CultureInfo CurrentEditionCulture { get; set; }

        public string ExpectedUrl { get; set; }

        internal override void RedirectTo(string url)
        {
            ExpectedUrl = url;
        }

        private string _returnUrl;

        public void SetReturnUrl(string url)
        {
            _returnUrl = url;
        }

        protected override string ReturnURL
        {
            get
            {
                return _returnUrl;
            }
        }
    }
}